var Paddle = function (g) {
    var img = g.imgByName('paddle');
    var o = {
        image: img,
        x: 100,
        y: 280,
        speed: 10,
    };
    o.move = function (x) {
        if (x < 0) {
            x = 0
        }
        if (x > 420 - o.image.width) {
            x = 420 - o.image.width
        }
        o.x = x
    }
    o.moveLeft = function () {
        o.move(o.x - o.speed)
    }
    o.moveRight = function () {
        o.move(o.x + o.speed)
    }
    o.collide = function (ball) {
        return checkPound(o, ball)
    }
    return o;
}